<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
  <meta http-equiv="CONTENT-TYPE" content="text/html; charset=utf-8">
  <title>Chapter 6. Active Render Toolkit</title>
  <meta name="GENERATOR" content="OpenOffice.org 2.0  (Linux)">
  <meta name="CREATED" content="20061010;23200100">
  <meta name="CHANGEDBY" content="kent">
  <meta name="CHANGED" content="20061011;3441000">
<!-- saved from url=(0022)http://internet.e-mail -->
  <style type="text/css">
	<!--
		TD P { color: #000000 }
		P { color: #000000 }
		H2 { color: #000000 }
		H3 { color: #000000 }
		TH P { color: #000000 }
		DT { color: #000000 }
		PRE { color: #000000 }
		A:link { color: #0000ff }
		A:visited { color: #840084 }
	-->
	</style>
</head>
<body dir="ltr"
 style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"
 lang="en-US" link="#0000ff" vlink="#840084">
<h2 lang="en"><a name="id2650022"></a>Chapter 5.&nbsp;CCT --
CS2335 Component Toolkit (4 Person Lab)</h2>
<h3 lang="en">Kent Czechowski</h3>
<table border="1" cellpadding="2" cellspacing="2" width="100%">
  <tbody>
    <tr>
      <th colspan="3" valign="top">
      <p align="left"><b>Revision History</b></p>
      </th>
    </tr>
    <tr>
      <td>
      <p align="left">Revision 1.0</p>
      </td>
      <td>
      <p align="left">2006-10-1</p>
      </td>
      <td>
      <p align="left">KC</p>
      </td>
    </tr>
    <tr>
      <td colspan="3">
      <p align="left">Initial Release</p>
      </td>
    </tr>
  </tbody>
</table>
<p lang="en"><b>Table of Contents</b></p>
<dl>
  <dd>
    <table border="0" cellpadding="2" cellspacing="0" width="480">
      <col width="77"> <col width="235"> <col width="156"> <tbody>
        <tr>
          <td rowspan="2" valign="top" width="77">
          <p align="center"><img
 src="sm06cs2335_Lab06_files/important.png" name="graphics1"
 alt="[Important]" align="bottom" border="0" height="38" width="75"></p>
          </td>
          <th width="235">
          <p align="left">Important</p>
          </th>
          <td valign="top" width="156"><br>
          </td>
        </tr>
        <tr>
          <td colspan="2" valign="top" width="395">
          <p align="left">Due on Sakai by 3/9/2007 11:59pm</p>
          </td>
        </tr>
      </tbody>
    </table>
  </dd>
</dl>
<h2 lang="en">Graphics Introduction</h2>
<p lang="en">This lab serves the purpose of introducing you to a
whole new kind of GUI programming in C# that provides complete and
flexible control over the look and feel of your program. In .Net the
Graphical Design Interface removes
the dependence on the System.Windows.Froms namespace by giving the
programmer complete control over the Graphical Interface. Instead of
a library of common widgets (like System.Windows.Forms.Button or
Systen.Windows.Forms.TextBow), GDI+ offers low-level functions for
drawing to the screen.<br>
To demonstrate your understanding of the GDI+ library, you will be
asked to implement your own GUI components.&nbsp; For example, you will
no longer
use Button,Panel or Checkbox, but instead will recreate versions
of those classes on your own. By the end of this lab, you should have a
deep understanding of the event heirachy of standard GUI
components/widgets and experience using a graphics library.<br>
</p>
<h2 lang="en"><a name="id2686829"></a>Project Requirements</h2>
<h3 lang="en"><a name="id2686834"></a>Overview</h3>
<p lang="en">The CS2335 Component Toolkit is your chance to implement a
simplified
version of the WinForms library. There is a core set of components
(graphical elements) that everyone will code, then a small demo
program to show off your components and demonstrate that each of your
widgets works properly.<br>
<br>
</p>
<h4>CCT Requirements</h4>
The CS2335 Component Toolkit will consist of ten classes: a main
window, seven components, and two sprite classes. Each of the classes
has
an accompanying Interface that
has the required properties, methods, and events along with
documentation descibing the class's functionality.<br>
<br>
Required Classes:<br>
<br>
&nbsp; Components<br>
&nbsp;&nbsp;&nbsp; Button - (provided)<br>
&nbsp;&nbsp;&nbsp; Label&nbsp; - (easy)<br>
&nbsp;&nbsp;&nbsp; ProgressBar - (easy)<br>
&nbsp;&nbsp;&nbsp; DomainUpDown - (easy)<br>
&nbsp;&nbsp;&nbsp; TextBox - (challenging)<br>
&nbsp;&nbsp;&nbsp; ListBox - (moderate)<br>
&nbsp;&nbsp;&nbsp; TreeView - (challenging)<br>
&nbsp;Main Window<br>
&nbsp;&nbsp;&nbsp; CCTForm - (important!)<br>
&nbsp;Sprites<br>
&nbsp;&nbsp;&nbsp; Sprite<br>
&nbsp;&nbsp;&nbsp; SpriteStore<br>
<br>
<br>
Notice: You may not use any classes (except for the Form
class for the CCTForm) from the System.Windows.Forms namespace.<br>
<br>
<h5>CCT Components</h5>
Your group will be required to implement seven components. These
components do not have to look exactly like the standard
System.Windows.Forms components, but they should have most of the same
functionallity.&nbsp; If you would like to give your components a theme
or make them all white and gold, you are encouraged to do that.&nbsp;
Up to 5 points of extra credit will be given to groups that create
snazy/professional looking components.<br>
<p lang="en">All components should implement the IComponent interface
as well as their associated interface (ie. ICCTButton, ICCTComboBox).
Since most components share similar functionality, your group may
find it easiest to make a CCTComponent class and have all of the
componenets as subclasses of it. The IComponent interface requires that
each
component have the following Properties, Methods, and Events:</p>
<p lang="en"> <b>&nbsp;&nbsp;&nbsp; Properties</b><br>
&nbsp;&nbsp;&nbsp; Bounds <br>
&nbsp;&nbsp;&nbsp; Location <br>
&nbsp;&nbsp;&nbsp; Name <br>
&nbsp;&nbsp;&nbsp; Font <br>
&nbsp;&nbsp;&nbsp; Owner<br>
&nbsp;&nbsp;&nbsp; Text <br>
&nbsp;&nbsp;&nbsp; BackColor<br>
</p>
<p lang="en"> <b>&nbsp;&nbsp;&nbsp; Methods</b> <br>
&nbsp;&nbsp;&nbsp; Invalidate<br>
&nbsp;&nbsp;&nbsp; Hide <br>
&nbsp;&nbsp;&nbsp; Show <br>
&nbsp;&nbsp;&nbsp; OnKeyPress<br>
&nbsp;&nbsp;&nbsp; OnGotFocus<br>
&nbsp;&nbsp;&nbsp; OnLostFocus<br>
&nbsp;&nbsp;&nbsp; OnPaint<br>
&nbsp;&nbsp;&nbsp; OnMouseClick<br>
</p>
<p lang="en"> <b>&nbsp;&nbsp;&nbsp; Events </b><br>
&nbsp;&nbsp;&nbsp; Click <br>
&nbsp;&nbsp;&nbsp; GotFocus <br>
&nbsp;&nbsp;&nbsp; KeyPress <br>
&nbsp;&nbsp;&nbsp; LostFocus <br>
&nbsp;&nbsp;&nbsp; Paint <br>
</p>
<br>
<h4>The Main Window</h4>
In addiction to the Components, you must also create a
CCWForm class that functions as a Window (it should be a subclass of
Form). Your application will normally have
only one of these, and everything else will run inside it. This class
is the most critical part of the project, so
plan out how this class will work before starting to work on the
components.<br>
<br>
<h4>Sprites</h4>
A Sprite class is usually used in games as a means of associating a
character or object with its onscreen presence.&nbsp; By including a
SpriteStore, users have the ability to easily manage the image and
anamation resources efficently.<br>
&nbsp;<br>
Sprite - A image that can be displayed on the screen.<br>
SpriteStore - Not a gui component, but a means of
storing all the sprites being used. Should support lazy loading of
sprites or the sprite images (No sprites loaded from disk until
actually asked for.)<br>
<h3 lang="en">Demo Application</h3>
<p lang="en">Once you have created a set of components, you will be
able to use them to create any awesome looking interface you desire. We
have provided a simple demo application to demonstrate some of the
toolkit functionallity, but we would like your group to create your
own, more
thorough, application.&nbsp; This does not have to be a useful
application,
just something that uses all of the components and a variety of
functionallity. Be creative.<br>
<br>
</p>
<h3 lang="en"><a name="id2686935"></a>Extra Credit</h3>
<p lang="en">For those teams looking to go above and beyond the call
of duty, we are allowing teams to complete extra features of their
chosing. </p>
<p lang="en">You can do any/all of the following extra credit for a
maximum of 30 pts. You can do "part" of an extra credit
item to get partial credit. </p>
<ul>
  <li>
    <p style="margin-bottom: 0in;" lang="en">5-15 pts each - Implement
more
complex components like :&nbsp; ComboBox, TreeSelect, or Calander<br>
    </p>
  </li>
  <li>
    <p style="margin-bottom: 0in;" lang="en">5 pts - TA discression for
impressive effort. This may be quality of demo app, use of advanced C#
features, or overall professional level of work. TA Discression is
not included in the 30 point limit. </p>
  </li>
  <li>
    <p style="margin-bottom: 0in;" lang="en">5 pts - The ability to
highlight text in the TextBox and cut/copy/paste from the
Clipboard. </p>
  </li>
  <li>
    <p style="margin-bottom: 0in;" lang="en">4 pts - Drag and Drop. The
ability to smoothly drag and drop pieces (Sprites) in your main window.
    </p>
  </li>
  <li>
    <p lang="en">4 pts - An effect on an component, such as Menus
sliding in or an Image fading in/out (4 pts each up to 12 pts) </p>
  </li>
</ul>
<h3 lang="en"><a name="id2687006"></a>Deliverables</h3>
<p lang="en">One of your group members must turn in the following: </p>
<ul>
  <li>
    <p style="margin-bottom: 0in;" lang="en">All source code needed to
run your program. </p>
  </li>
  <li>
    <p lang="en">The NAnt buildfile or a working VS project file<br>
    </p>
The build file (or VS project file) must have separate run targets for
each of the demos (your group's demo + sampleDemo1-sampleDemo3). A nant
file with the following targets has been included:</li>
&nbsp; build-CCT<br>
&nbsp; run-sampleDemo1<br>
&nbsp; run-sampleDemo2 <br>
&nbsp; run-sampleDemo3 <br>
&nbsp; run-groupDemo<br>
If you pass Nant the -D:WinForm=true commandline argument (ie nant
-D:WinForm=true run-sampleDemo1) it will compile the Demos with the
WinForms library instead of CCT.<br>
  <br>
  <li>
    <p lang="en">README file with the following information </p>
    <pre>                          <span lang="en">CS2335 - Lab 5 - Spring 2007</span><br><br>            <span
 lang="en">Team Members:</span><br>            <span lang="en">gt____, gt____, gt_____, gt____</span><br><br>            <span
 lang="en">Requirements prior to running the program:</span><br>            <span
 lang="en">.</span><br>            <span lang="en">.</span><br>            <span
 lang="en">.</span><br><br>            <span lang="en">Instructions to use your demo application:</span><br>            <span
 lang="en">.</span><br>            <span lang="en">.</span><br>            <span
 lang="en">.</span><br><br>            <span lang="en">Known Bugs:</span><br>            <span
 lang="en">.</span><br>            <span lang="en">.</span><br>            <span
 lang="en">.</span><br><br>            <span lang="en">O/S(s) Developed/Tested under:</span><br>            <span
 lang="en">.</span><br>            <span lang="en">.</span><br>            <span
 lang="en">.</span><br><br>            <span lang="en">Extra Credit Opportunities Attempted:</span><br>            <span
 lang="en">.</span><br>            <span lang="en">.</span><br>            <span
 lang="en">.</span><br><br>            <span lang="en">Comments:</span><br>            <span
 lang="en">.</span><br>            <span lang="en">.</span><br>            <span
 lang="en">.</span><br>          </pre>
  </li>
</ul>
<dl>
  <dd>
    <table border="0" cellpadding="2" cellspacing="2">
      <tbody>
        <tr>
          <td rowspan="2" valign="top" width="25">
          <p align="center"><img
 src="sm06cs2335_Lab06_files/important.png" name="graphics5"
 alt="[Important]" align="bottom" border="0" height="38" width="75"></p>
          </td>
          <th>
          <p align="left">Important</p>
          </th>
          <td valign="top"><br>
          </td>
        </tr>
        <tr>
          <td colspan="2" valign="top">
          <p align="left">Please keep in mind the Course Policies
(http://www.cc.gatech.edu/classes/AY2006/cs2335_fall/policies.shtml)
when creating and submitting your project. Also remember that archives
are expected to be in .tar.gz or .zip format. Any deviation from Course
Policy
or the requests in this lab write-up can result in severe point
penalty. </p>
          </td>
        </tr>
      </tbody>
    </table>
  </dd>
</dl>
<p><br>
<br>
</p>
</body>
</html>
